<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/css/default.css" />
		<link rel="stylesheet" type="text/css" href="${contextPath}/resource/tree/zTreeStyle/zTreeStyle.css" />
		<script language="JavaScript">

	function submitForm(fm) {
		var userPw = document.getElementById("user.userPw").value
	    var password = document.getElementById("newPwd").value
		var newPwd1 = document.getElementById("newPwd1").value
		if(userPw ==""){
			alert("原密码必须输入!");
			return;
		}
		if(password =="" || newPwd1==""){
			alert("新密码必须输入!");
			return;
		}
		if(password != newPwd1){
			alert("两次输入密码不一致!");
			return;
		}
		fm.submit();
	}
</script>
	</head>
	<body>
		<s:form action="userAction_updatePwd.do" namespace="/user" method="post">
			<table class="menu_table">
				<tr>
					<th>
						密码更改
					</th>
				</tr>
			</table>
			<div class="listtable">
				<div class="secondDiv">
					<table class="form_table" >
						<tr>
							<th width="20%">原密码</th>
							<td >
								<input type="password" name="user.userPw" size="22" maxlength="32" id="user.userPw"/>
								<span class="txtblue" id="resulpassword">*</span>
							</td>
						</tr>
						<tr>
							<th width="20%">新密码</th>
							<td >
								<input type="password" name="newPwd" size="22" maxlength="32" id="newPwd"/>
								<span class="txtblue" id="resulpassword">*</span>
							</td>
						</tr>
						<tr>
							<th width="20%">新密码</th>
							<td >
								<input type="password" name="newPwd1" size="22" maxlength="32" id="newPwd1"/>
								<span class="txtblue" id="resulpassword">*</span>
							</td>
						</tr>
					</table>
					<div style="margin-top: 20px; margin-left: 30px;">
						<s:token></s:token>
						 <input type="button"  class="apply_style"  onclick="submitForm(this.form)" />
						 <input type="reset" class="reset_style"  value="" />
					</div>
					<br />
				</div>
			</div>
		</s:form>
	</body>
</html>
